<template>
	<!-- 文章详情 -->
	<view>
		<uni-nav-bar left-icon="back" :title="title" color="#fff" fixed="true" statusBar="true" backgroundColor="#F22F29" @clickLeft="fnGoBack()"></uni-nav-bar>
		<view class="content" v-html="content"></view>
	</view>
</template>

<script>
	import uniNavBar from '@/components/uni-nav-bar/uni-nav-bar.vue'
	export default {
		components: {
			uniNavBar
		},
		data() {
			return {
				article_id:'',
				title:'',
				content:''
			};
		},
		onLoad(option) {
			this.article_id = option.id
			this.title = option.title
			this.fnGetArticleDetail()
		},
		methods:{
			fnGoBack(){
				uni.navigateBack()
			},
			fnGetArticleDetail(){
				this.request({
					url: '/czb/help_center/getArticleDetails',
					method: 'POST',
					data: {
						'store_id': 1,
						'article_id':this.article_id
					},
				}).then((ret) => {
					console.log(ret);
					if (ret.code == 0) {
						this.content = ret.data.content
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding: 20rpx;
		font-size: 30rpx;
	}
</style>
